<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				width: 100px;
				height: 100px;
				background-color: pink;
			}
		</style>
	</head>
	<body>
		<div>
		</div>
		<script>
			var oDiv=document.querySelector('div')
			oDiv.onclick=function(e){
				e = e || window.event
				console.log(e.offsetX)
				console.log(e.offsetY)
			}
		</script>
	</body>
</html>
